/*
** handle_expulse_mnt.c for zappy/server in /home/Smaxo/Travail/zappy-2015-2014s-renard_g/serv-src
**
** Made by maximilien addari
** Login   <addari_m@epitech.net>
**
** Started on  Thu Jul 12 14:52:22 2012 maximilien addari
** Last update Thu Jul 19 17:54:19 2012 pierrick druart
*/

#include	"server.h"

static void	send_player(t_list *list, t_client *graph, t_game *game)
{
  t_client	*client;
  t_item	*tmp;

  tmp = list->head;
  while (tmp != NULL)
    {
      client = (struct s_client *)tmp->content;
      if (client->gamer != NULL)
        serv_monitor("ppo", client, game, graph);
      tmp = tmp->next;
    }
}

char		handle_expulse_mnt(t_game *game, t_list *list, t_event *event)
{
  (void)event;
  if (game->sleep == 0 || game->sleep > 10000)
    {
      send_player(list, game->graphic, game);
      return (0);
    }
  return (1);
}
